<?php

namespace App\Http\Controllers\Api\O1\UserCenter\Paper;

use Biz\Services\Site\SitePaperThemeService;
use Biz\Transformers\Site\PaperThemeTransformerCollection;
use Illuminate\Http\Request;
use Laravel\Lumen\Routing\Controller as BaseController;

/**
 * ThemeController.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class ThemeController extends BaseController
{
    /**
     * @var mixed
     */
    protected $service;

    /**
     * PaperController constructor.
     *
     * @param SitePaperThemeService $service
     */
    public function __construct(SitePaperThemeService $service)
    {
        $this->service = $service;
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        $results = $this->service->getAllList($request);

        return new PaperThemeTransformerCollection($results);
    }
}
